package com.ly.base;

import com.ly.entity.HouseSubscribe;

/**
 * 预约状态码
 * @author ：LY
 * @date ：Created in 2020/11/26 21:01
 * @modified By：
 */
public enum  HouseSubscribeStatus {
    NO_SUBSCRIBE(0),//未预约
    IN_ORDER_LIST(1),//已加入待看清单
    IN_ORDER_TIME(2),//已经预约看房时间
    FINISH(3);//已完成预约

    HouseSubscribeStatus(int value) {
        this.value = value;
    }

    private int value;

    public int getValue() {
        return value;
    }
    public static HouseSubscribeStatus of(int value){
        for (HouseSubscribeStatus status:HouseSubscribeStatus.values()){
            if (status.getValue()==value){
                return status;
            }
        }
        return HouseSubscribeStatus.NO_SUBSCRIBE;
    }
}
